package com.ruoyi.common.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.CustomData;
import com.ruoyi.common.core.domain.query.CustomDataConfigQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * 自定义数据接口
 */
@Repository
public interface CustomDataMapper extends BaseMapper<CustomData> {

    CustomData getByOwnerId(@Param("type") String type, @Param("ownerId") String ownerId);

    CustomData getByDataName(@Param("data_name") String data_name);

    long countDemandConfirm(@Param("userId") Long userId);

    long countTaskCheck(@Param("userId") Long userId);

    List<LinkedHashMap> selectBySql(@Param("sql")String sql);

    List<LinkedHashMap> recommendIndustryCharacteristics(@Param("keywords") String keywords, @Param("limit") int limit);

    List<LinkedHashMap> recommendBusinessScope(@Param("industryCharacteristics") String industryCharacteristics, @Param("limit") int limit);

    List<CustomDataConfigQuery> selectAllDynamic();


    List<CustomDataConfigQuery> selectBy(@Param("type") String type);
}